package handler.message;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import protocol.packet.message.MessageResponse;

import java.util.Date;

public class MessageResponseHandler extends SimpleChannelInboundHandler<MessageResponse> {
    @Override
    protected void channelRead0(ChannelHandlerContext channelHandlerContext, MessageResponse response) throws Exception {
        String fromUserId = response.getFromUserId();
        String fromUserName = response.getFromUserName();
        System.out.println(fromUserId + ":" + fromUserName + "->" + response.getMsg());
    }
}
